<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.model.User1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
		
		<%		
		//不要忘记设置请求的编码格式
		request.setCharacterEncoding("utf-8") ;%>
		<jsp:useBean id="ul" class="com.model.User1"></jsp:useBean>
		<jsp:setProperty property="name" name="ul" param="username"/>
		<jsp:setProperty property="password" name="ul" param="pwd"/>
		
		
		<%
		//如果ul这个对象合法,直接打印登录成功;否则打印登录失败
		if(ul.validate()){
			out.println("登录成功!");
		}else{
			out.println("登录失败!");
		}
		%>
</body>
</html>